<?php /* Smarty version 2.6.19, created on 2009-01-03 19:46:17
         compiled from admin/admin_content.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'strip_tags', 'admin/admin_content.tpl', 19, false),array('modifier', 'truncate', 'admin/admin_content.tpl', 19, false),)), $this); ?>
<h2>Content Manager</h2>
<?php if ($this->_tpl_vars['action'] != 'edit' && $this->_tpl_vars['action'] != 'new' && $this->_tpl_vars['action'] != 'moveitem'): ?>
<?php if ($this->_tpl_vars['addallowed']): ?><div class="toplinks"><a href="<?php echo $this->_tpl_vars['pagename']; ?>
&amp;action=new" title="Add Page"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/add.png" alt="Add Page" border="0" /></a>
</div><?php endif; ?>
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" class="table sortable-onload-2 rowstyle-alt paginate-15" id="sortTable">
<thead>
<?php if ($this->_tpl_vars['numcontent'] > 0): ?>
  <tr valign="top"> 
    <th width="10%" class="smallhead"></th>
    <th width="30%" class="smallhead sortable">Name</th>
    <th class="smallhead sortable">Summary</th>
  </tr>
  </thead>
  <tbody>
 <?php unset($this->_sections['contentloop']);
$this->_sections['contentloop']['name'] = 'contentloop';
$this->_sections['contentloop']['loop'] = is_array($_loop=$this->_tpl_vars['numcontent']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['contentloop']['show'] = true;
$this->_sections['contentloop']['max'] = $this->_sections['contentloop']['loop'];
$this->_sections['contentloop']['step'] = 1;
$this->_sections['contentloop']['start'] = $this->_sections['contentloop']['step'] > 0 ? 0 : $this->_sections['contentloop']['loop']-1;
if ($this->_sections['contentloop']['show']) {
    $this->_sections['contentloop']['total'] = $this->_sections['contentloop']['loop'];
    if ($this->_sections['contentloop']['total'] == 0)
        $this->_sections['contentloop']['show'] = false;
} else
    $this->_sections['contentloop']['total'] = 0;
if ($this->_sections['contentloop']['show']):

            for ($this->_sections['contentloop']['index'] = $this->_sections['contentloop']['start'], $this->_sections['contentloop']['iteration'] = 1;
                 $this->_sections['contentloop']['iteration'] <= $this->_sections['contentloop']['total'];
                 $this->_sections['contentloop']['index'] += $this->_sections['contentloop']['step'], $this->_sections['contentloop']['iteration']++):
$this->_sections['contentloop']['rownum'] = $this->_sections['contentloop']['iteration'];
$this->_sections['contentloop']['index_prev'] = $this->_sections['contentloop']['index'] - $this->_sections['contentloop']['step'];
$this->_sections['contentloop']['index_next'] = $this->_sections['contentloop']['index'] + $this->_sections['contentloop']['step'];
$this->_sections['contentloop']['first']      = ($this->_sections['contentloop']['iteration'] == 1);
$this->_sections['contentloop']['last']       = ($this->_sections['contentloop']['iteration'] == $this->_sections['contentloop']['total']);
?>
	  <tr valign="middle" class="text"> 
		<td class="text"><div align="center"><?php if ($this->_tpl_vars['editallowed']): ?><a href="<?php echo $this->_tpl_vars['pagename']; ?>
&amp;id=<?php echo $this->_tpl_vars['content'][$this->_sections['contentloop']['index']]['id']; ?>
&amp;action=edit"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/edit.gif" border="0" alt="Edit <?php echo $this->_tpl_vars['content'][$this->_sections['contentloop']['index']]['friendly']; ?>
" title="Edit <?php echo $this->_tpl_vars['content'][$this->_sections['contentloop']['index']]['name']; ?>
" /></a><?php else: ?><a href="<?php echo $this->_tpl_vars['pagename']; ?>
&amp;id=<?php echo $this->_tpl_vars['content'][$this->_sections['contentloop']['index']]['id']; ?>
&amp;action=edit" title="View <?php echo $this->_tpl_vars['content'][$this->_sections['contentloop']['index']]['name']; ?>
"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/page.png" border="0" alt="View <?php echo $this->_tpl_vars['content'][$this->_sections['contentloop']['index']]['name']; ?>
" /></a><?php endif; ?>&nbsp;&nbsp;<?php if ($this->_tpl_vars['editallowed'] && ! $this->_tpl_vars['limit']): ?><a href="<?php echo $this->_tpl_vars['pagename']; ?>
&amp;action=moveitem&amp;id=<?php echo $this->_tpl_vars['content'][$this->_sections['contentloop']['index']]['id']; ?>
" title="Move <?php echo $this->_tpl_vars['content'][$this->_sections['contentloop']['index']]['friendly']; ?>
"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/move.gif" border="0" alt="Move <?php echo $this->_tpl_vars['content'][$this->_sections['contentloop']['index']]['friendly']; ?>
" /></a><?php else: ?><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/move_grey.gif" border="0" alt="Editing Disabled" title="Editing Disabled" /><?php endif; ?>&nbsp;&nbsp;<?php if ($this->_tpl_vars['deleteallowed']): ?><a href="<?php echo $this->_tpl_vars['pagename']; ?>
&amp;action=delete&amp;id=<?php echo $this->_tpl_vars['content'][$this->_sections['contentloop']['index']]['id']; ?>
"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/delete.gif" border="0" alt="Delete <?php echo $this->_tpl_vars['content'][$this->_sections['contentloop']['index']]['friendly']; ?>
" title="Delete <?php echo $this->_tpl_vars['content'][$this->_sections['contentloop']['index']]['friendly']; ?>
" /></a><?php else: ?><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/delete_grey.gif" border="0" alt="Deleting Disabled" title="Deleting Disabled" /><?php endif; ?></div></td>
		<td class="text"><span class="hintanchor" title="Internal Name :: <?php echo $this->_tpl_vars['content'][$this->_sections['contentloop']['index']]['name']; ?>
"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/information.png" alt="[i]"/></span><?php if ($this->_tpl_vars['content'][$this->_sections['contentloop']['index']]['friendly']): ?><?php echo $this->_tpl_vars['content'][$this->_sections['contentloop']['index']]['friendly']; ?>
<?php else: ?>Please set a friendly name for this page<?php endif; ?></td>
        <td class="text"><?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['content'][$this->_sections['contentloop']['index']]['content'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp) : smarty_modifier_strip_tags($_tmp)))) ? $this->_run_mod_handler('truncate', true, $_tmp, 150) : smarty_modifier_truncate($_tmp, 150)); ?>
</td>
	  </tr>  
	<?php endfor; endif; ?>
    </tbody>
</table>
<?php else: ?>
<div align="center">No Static Content</div>
<?php endif; ?>
<?php elseif ($this->_tpl_vars['action'] == 'new'): ?>
<script type="text/javascript">
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "../scripts/validator.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
</script>
<div align="center">
<form name="Content" method="post" action="<?php echo $this->_tpl_vars['editFormAction']; ?>
" onsubmit="return checkForm([['name','custom',true,0,0,/^[a-zA-Z0-9_]*$/],['fname','text',true,0,0,''],['editor','text',0,0,'']]);"> 
<fieldset class="formlist">
<legend>New Page</legend>
<div class="field">
      <label for="name" class="label">Internal Name<span class="hintanchor" title="This is the name that CMScout uses internally to refer to the page. It can only contain alphanumeric characters and the underscore, and can not contain any spaces. It can not be changed once it has been set."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
      <div class="inputboxwrapper"><input name="name" type="text" id="name" class="inputbox" onblur="checkElement('name', 'custom', true, 0, 0, /^[a-zA-Z0-9_]*$/);" /><br /><span class="fieldError" id="nameError">Required: May only contain alphanumeric characters and the underscore.</span></div><br />
    
      <label for="fname" class="label">Friendly Name<span class="hintanchor" title="General name for the page."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
      <div class="inputboxwrapper"><input name="fname" type="text" id="fname" class="inputbox" onblur="checkElement('fname', 'text', true, 0, 0, '');" /><br /><span class="fieldError" id="fnameError">Required</span></div><br />

      <span class="label">Default Group Access<span class="hintanchor" title="Give users in the default group access to this page."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></span>
      <div class="inputboxwrapper"><input type="radio" name="access" id="access:yes" value="1" checked="checked" /><label for="access:yes">Yes</label>
    <input name="access" id="access:no" type="radio" value="0"  /><label for="access:no">No</label></div><br />

      <span class="label">Guest User Access<span class="hintanchor" title="Give guests access to this page."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></span>
      <div class="inputboxwrapper"><input type="radio" name="gaccess" id="gaccess:yes" value="1" checked="checked" /><label for="gaccess:yes">Yes</label>
    <input name="gaccess" id="gaccess:no" type="radio" value="0"  /><label for="gaccess:no">No</label></div><br />

</div>
      <textarea id="editor" name="editor" style="width:100%; height:500px" class="inputbox"></textarea>
	  
    <div class="submitWrapper"> 
        <input type="submit" name="Submit" value="Submit" class="button" />
        <input name="Cancel" type="button" id="Cancel" value="Cancel" onclick="window.location = '<?php echo $this->_tpl_vars['pagename']; ?>
'" class="button" />
      </div>
      </fieldset>
</form>
</div>
<?php elseif ($this->_tpl_vars['action'] == 'edit'): ?>
<script type="text/javascript">
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "../scripts/validator.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
</script>
<div align="center">
<?php if ($this->_tpl_vars['editallowed']): ?><form name="Content" method="post" action="<?php echo $this->_tpl_vars['editFormAction']; ?>
" onsubmit="return checkForm([['fname','text',true,0,0,''],['editor','text',0,0,'']]);">
<fieldset class="formlist">
<legend>Edit Page</legend><?php else: ?><div class="formlist"><?php endif; ?>
<div class="field">
      <label for="name" class="label">Internal Name<span class="hintanchor" title="This is the name that CMScout uses internally to refer to the page. It can not be changed"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
      <div class="inputboxwrapper"><?php echo $this->_tpl_vars['contents']['name']; ?>
</div><br />
    
      <label for="fname" class="label">Friendly Name<span class="hintanchor" title="General name for the page."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
      <div class="inputboxwrapper"><?php if ($this->_tpl_vars['editallowed']): ?><input name="fname" type="text" id="fname" class="inputbox" onblur="checkElement('fname', 'text', true, 0, 0, '');" value="<?php echo $this->_tpl_vars['contents']['friendly']; ?>
" /><br /><span class="fieldError" id="fnameError">Required</span><?php else: ?><?php echo $this->_tpl_vars['contents']['friendly']; ?>
<?php endif; ?></div><br />
    </div>
      <?php if ($this->_tpl_vars['editallowed']): ?><textarea id="editor" name="editor" style="width:100%; height:500px" class="inputbox"><?php echo $this->_tpl_vars['Showcontent']; ?>
</textarea><?php else: ?><?php echo $this->_tpl_vars['Showcontent']; ?>
<?php endif; ?>
	  
    <?php if ($this->_tpl_vars['editallowed']): ?><div class="submitWrapper"> 
        <input type="submit" name="Submit" value="Submit" class="button" />
        <input name="Cancel" type="button" id="Cancel" value="Cancel" onclick="window.location = '<?php echo $this->_tpl_vars['pagename']; ?>
'" class="button" />
      </div>
      </fieldset>
</form><?php else: ?></div><?php endif; ?>
</div>
<?php elseif ($this->_tpl_vars['action'] == 'moveitem'): ?>
<div align="center">
 <form method="post" action="<?php echo $this->_tpl_vars['editFormAction']; ?>
" name="form">
 <fieldset class="formlist">
 <legend>Move Page</legend>
 <div class="field">
 <label for="place" class="label">Location<span class="hintanchor" title="Location to move this page too."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
 <div class="inputboxwrapper">
 <select name="place" class="inputbox">
 <optgroup label="Group Site">
  <?php unset($this->_sections['loop']);
$this->_sections['loop']['name'] = 'loop';
$this->_sections['loop']['loop'] = is_array($_loop=$this->_tpl_vars['numpatrols']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['loop']['show'] = true;
$this->_sections['loop']['max'] = $this->_sections['loop']['loop'];
$this->_sections['loop']['step'] = 1;
$this->_sections['loop']['start'] = $this->_sections['loop']['step'] > 0 ? 0 : $this->_sections['loop']['loop']-1;
if ($this->_sections['loop']['show']) {
    $this->_sections['loop']['total'] = $this->_sections['loop']['loop'];
    if ($this->_sections['loop']['total'] == 0)
        $this->_sections['loop']['show'] = false;
} else
    $this->_sections['loop']['total'] = 0;
if ($this->_sections['loop']['show']):

            for ($this->_sections['loop']['index'] = $this->_sections['loop']['start'], $this->_sections['loop']['iteration'] = 1;
                 $this->_sections['loop']['iteration'] <= $this->_sections['loop']['total'];
                 $this->_sections['loop']['index'] += $this->_sections['loop']['step'], $this->_sections['loop']['iteration']++):
$this->_sections['loop']['rownum'] = $this->_sections['loop']['iteration'];
$this->_sections['loop']['index_prev'] = $this->_sections['loop']['index'] - $this->_sections['loop']['step'];
$this->_sections['loop']['index_next'] = $this->_sections['loop']['index'] + $this->_sections['loop']['step'];
$this->_sections['loop']['first']      = ($this->_sections['loop']['iteration'] == 1);
$this->_sections['loop']['last']       = ($this->_sections['loop']['iteration'] == $this->_sections['loop']['total']);
?>
   <option value="group_<?php echo $this->_tpl_vars['patrols'][$this->_sections['loop']['index']]['id']; ?>
"><?php echo $this->_tpl_vars['patrols'][$this->_sections['loop']['index']]['teamname']; ?>
</option>
  <?php endfor; endif; ?>
  </optgroup>
  <optgroup label="Sub Site">
  <?php unset($this->_sections['loop']);
$this->_sections['loop']['name'] = 'loop';
$this->_sections['loop']['loop'] = is_array($_loop=$this->_tpl_vars['numsubsites']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['loop']['show'] = true;
$this->_sections['loop']['max'] = $this->_sections['loop']['loop'];
$this->_sections['loop']['step'] = 1;
$this->_sections['loop']['start'] = $this->_sections['loop']['step'] > 0 ? 0 : $this->_sections['loop']['loop']-1;
if ($this->_sections['loop']['show']) {
    $this->_sections['loop']['total'] = $this->_sections['loop']['loop'];
    if ($this->_sections['loop']['total'] == 0)
        $this->_sections['loop']['show'] = false;
} else
    $this->_sections['loop']['total'] = 0;
if ($this->_sections['loop']['show']):

            for ($this->_sections['loop']['index'] = $this->_sections['loop']['start'], $this->_sections['loop']['iteration'] = 1;
                 $this->_sections['loop']['iteration'] <= $this->_sections['loop']['total'];
                 $this->_sections['loop']['index'] += $this->_sections['loop']['step'], $this->_sections['loop']['iteration']++):
$this->_sections['loop']['rownum'] = $this->_sections['loop']['iteration'];
$this->_sections['loop']['index_prev'] = $this->_sections['loop']['index'] - $this->_sections['loop']['step'];
$this->_sections['loop']['index_next'] = $this->_sections['loop']['index'] + $this->_sections['loop']['step'];
$this->_sections['loop']['first']      = ($this->_sections['loop']['iteration'] == 1);
$this->_sections['loop']['last']       = ($this->_sections['loop']['iteration'] == $this->_sections['loop']['total']);
?>
   <option value="site_<?php echo $this->_tpl_vars['subsites'][$this->_sections['loop']['index']]['id']; ?>
"><?php echo $this->_tpl_vars['subsites'][$this->_sections['loop']['index']]['name']; ?>
</option>
  <?php endfor; endif; ?>
  </div>
 </select></div><br />
 </div>
 <div class="submitWrapper">
 <input type="Submit" name="Submit" id="Submit" value="Move" class="button" />&nbsp;<input type="button" value="Cancel" id="cancel" name="cancel" onclick="window.location = '<?php echo $this->_tpl_vars['pagename']; ?>
'" class="button" /></div>
 </fieldset>
 </form>
 </div>
<?php endif; ?>